# coding=utf-8

def docstring_parameter(obj1):
    """写一个可以添加变量的注释的装饰器"""
    def dec(obj):
        obj.__doc__ = obj.__doc__.format(obj1)
        return obj
    return dec

if __name__ == '__main__':

    # 案例一添加一个参数
    @docstring_parameter("3435243")
    def hello():
        '''{0}'''
        pass
    a = hello.__doc__
    print (a)